From 91ebcbb8f0e7e8505f856b17c5187e9ec466b7fa Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 18 Oct 2008 20:16:26 +0000 Subject: [PATCH] Fix SQL query so that it works properly --- includes/specials/SpecialWantedtemplates.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/specials/SpecialWantedtemplates.php b/includes/specials/SpecialWantedtemplates.php index 65bbecc83c..43b5cf8f87 100644 --- a/includes/specials/SpecialWantedtemplates.php +++ b/includes/specials/SpecialWantedtemplates.php @@ -35,13 +35,13 @@ class WantedTemplatesPage extends QueryPage { $name = $dbr->addQuotes( $this->getName() ); return " - SELECT $name as type," . - NS_TEMPLATE . " as namespace, + SELECT $name as type, + tl_namespace as namespace, tl_title as title, COUNT(*) as value FROM $templatelinks LEFT JOIN - $page ON tl_title = page_title AND page_namespace = ". NS_TEMPLATE ." - WHERE page_title IS NULL + $page ON tl_title = page_title AND tl_namespace = page_namespace + WHERE page_title IS NULL AND tl_namespace = ". NS_TEMPLATE ." GROUP BY tl_title "; } -- 2.20.1